﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Traceability.Infratruvture.Interfares
{
    public interface IBaseRequsitory<T> where T : class, new()
    {
        Task<int> AddAsync(T t);
        Task<int> UpdateAsync(T t);
        IQueryable<T> GetAll();
        int Del(T t);
        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="id">实体</param>
        /// <returns>返回受影响行数</returns>
        Task<int> DeleteAsync(int id);

    }
}
